$(function(){	
	var p=1;
	function list_qb(p){
		var d={};
		d.page=p;
		d.token=token;
		$.ajax({
		    type:"post",
		    url:url+'/user/mycomplainload.html?token='+token,
		    async:false,
		    data:d,
		    dataType:'json',
		    success:function(result){
		    	console.log(result);
		        if(result.status === "0001"){
		        	var data=result.data;
		        	
		        	var html = '';	        	
		        	for(var i in data){
		        		html += ' <li class="myserviceli_item"><p class="myserviceli_t1">'+data[i].content+'</p>';
						html += '<div class="myserviceli_picd">';
						var ss=data[i].picture;
						var arr=ss.split(',');
						console.log(arr);
						for(var j=0;j<arr.length;j++){
							html += '<img src="'+arr[j]+'" alt="" class="myserviceli_pic" />';
						}						
						html += '</div>';
						html += '<p class="myserviceli_t2">'+data[i].created_at+'</p>';
						html += '<p class="myserviceli_t3">系统回复：'+data[i].replay+'</p></li>';
		        	}
		        	if (html == "" || data.length < 10) {
						$('.notMore').css('display',"block")
					}
		        	$(".myservice_list").append(html);
		        }else{
		            isErr(result);
		        }
		    },
			error:function(){
				layer.msg("响应失败");
			}
		})
	}
	list_qb(1);
	//	下拉加载更多
	$(window).scroll(function() {
		if ($(document).scrollTop() >= $(document).height() - $(window).height() - 70) {			
		// console.log('我到底了');
			if ($('.notMore').css('display') != "block") {
				p++;
				list_qb(p);
			}
		}
	})
})